#include <iostream>
using namespace std;
int main()
{
    int a,n;
    cin>>a;
    int c,b;
    c=a/100;
    b=a/10%10;
    a=a%10;
    n = a*100+b*10+c;
    cout<<n;
    return 0;
}